perm filename MAPS[F8,ALS]4 blob
sn#325060 filedate 1977-12-30 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00015 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00003 00002 Board storaged in RAM and copied into SC as shown
C00006 00003 Board display arrangements
C00010 00004 Possible moves
C00012 00005 * Storage map
C00017 00006 Scratchpad Assignments
C00019 00007 Data movement between levels when going forward
C00024 00008 Byte treatment during (jump) FIND operations
C00030 00009 Byte treatment during (non-jump) FIND operations
C00033 00010 MAT score function
C00036 00011 Loading info
C00038 00012 DIALING INFO.
C00039 00013 PENDING CHANGES TO THE CHECKERS PROGRAM
C00042 00014 BAD BOARDS
C00044 00015 Names for checkers game skill levels
C00045 ENDMK
C⊗;
Board storaged in RAM and copied into SC as shown
At the end of a move the sides reverse.
Active and Passive pieces are interchanged
when written into the next ply level of RAM
---------------------------------
| |7| |6| |5| |4| |3| |2| |1| |0| Byte 0 LISL 0
---------------------------------
| |7| |6| |5| |4| |3| |2| |1| |0| Byte 1
Active ---------------------------------
| |7| |6| |5| |4| |3| |2| |1| |0| Byte 2
---------------------------------
| |7| |6| |5| |4| |3| |2| |1| |0| Byte 3
--- --------------------------------- ---
| |7| |6| |5| |4| |3| |2| |1| |0| Byte 0
---------------------------------
| |7| |6| |5| |4| |3| |2| |1| |0| Byte 1
Passive ---------------------------------
| |7| |6| |5| |4| |3| |2| |1| |0| Byte 2
---------------------------------
| |7| |6| |5| |4| |3| |2| |1| |0| Byte 3 LISL 7
--- --------------------------------- ---
| |7| |6| |5| |4| |3| |2| |1| |0| Byte 0
---------------------------------
| |7| |6| |5| |4| |3| |2| |1| |0| Byte 1
Kings ---------------------------------
| |7| |6| |5| |4| |3| |2| |1| |0| Byte 2
---------------------------------
| |7| |6| |5| |4| |3| |2| |1| |0| Byte 3
---------------------------------
Board display arrangements
Machine playing RED
X 7 -----------------
7←0 ↑Y | |R| |R| |R| |R|
0 ----------------- Answer Y
|R| |R| |R| |R| |
Passive ----------------- COLO= -1
| |R| |R| |R| |R|
----------------- Player to move first
| | | | | | | | |
----------------- Enter SC, LISL O'7'
| | | | | | | | | Display Red first
----------------- SR 1 and decrement
|B| |B| |B| |B| |
Active ----------------- Display board initially
| |B| |B| |B| |B| and say "YOUR MOVE"
-----------------
|B| |B| |B| |B| | Also display afteer
----------------- player's move
Test legal black moves, and for random first move selection
(8 entries to simplfy random number generation)
BLKM DC B'11110000' 4 pieces
DC B'00000100' Byte 1, RF
DC B'11100000' 3 pieces
DC B'00000101' Byte 1, LF
DC B'01000000' (11-15) repeat
DC B'00000100' Byte 1, RF
DC H'00'
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Machine playing BLACK
X 0 -----------------
0→7 ↓Y | |B| |B| |B| |B|
7 ----------------- Answer N
|B| |B| |B| |B| |
Passive ----------------- COLO= 0
| |B| |B| | | |B|
----------------- Machine move 11-15 shown
| | | | |B| | | |
----------------- Enter SC, LISL O'0'
| | | | | | | | | Display Red first
----------------- SL 1 and increment
|R| |R| |R| |R| |
Active ----------------- Do not show board untill
| |R| |R| |R| |R| after machine's move
----------------- and after side reversal
|R| |R| |R| |R| |
-----------------
Chose Black's move by lot from BLKM (above)
Then test legal moves for red
REDM DC B'00000111' 3 pieces
DC B'00001010' Byte 2, RB
DC B'00001111' 4 pieces
DC B'00001011' Byte 2, LB
DC H'00'
Possible moves
Black's first moves
Move Byte # X0 Y0 X1 Y1 ∂X ∂Y Dir
9-13 80 01 01 02 00 03 -1 1 RF
9-14 80 01 01 02 02 03 1 1 LF
10-14 40 01 03 02 02 03 -1 1 RF
10-15 40 01 03 02 04 03 1 1 LF
11-15 20 01 05 02 04 03 -1 1 RF
11-16 20 01 05 02 06 03 1 1 LF
12-16 10 01 07 02 06 03 -1 1 RF
Red's first moves
Move Byte # X0 Y0 X1 Y1 ∂X ∂Y Dir
21-17 08 02 00 05 01 04 1 -1 LB
22-17 04 02 02 05 01 04 -1 -1 RB
22-18 04 02 02 05 03 04 1 -1 LB
23-18 02 02 04 05 03 04 -1 -1 RB
23-19 02 02 04 05 05 04 1 -1 LB
24-19 01 02 06 05 05 04 -1 -1 RB
24-20 01 02 06 05 07 04 1 -1 LB
Square assignments
RED
-------------------------
| |32| |31| |30| |29|
-------------------------
|28| |27| |26| |25| | ↑ Forward
------------------------- ↓ Backward
| |24| |23| |22| |21| → Right
------------------------- ← Left
|20| |19| |18| |17| |
-------------------------
| |16| |15| |14| |13|
-------------------------
|12| |11| |10| | 9| |
-------------------------
| | 8| | 7| | 6| | 5|
-------------------------
| 4| | 3| | 2| | 1| |
-------------------------
BLACK
Black pieces go on low numbered squares and Black plays first
* Storage map
_______________________________________________________________
Image ar|_______________________________|_______________________________|
10 |_______________________________|_______________________________|
lines |_______________________________|_______________________________|
per |_______________________________|_______________________________|
__row___|_______________________________|_______________________________|
Ply ar. |Active pieces |Passive pieces | Kings |Mov|inf|ACT|PAS|
| 0 1 2 3 | 4 5 6 7 | 8 9 A B | C D E F |
H'0C00' | Used by RES. | | | |
H'0C10' |___________ ___|_______________|_______________|_______________|
H'0C20' |___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|see below
H'0C30' | Row 1 of the | board image | | |
|_______________|______________ |_______________|_______________|
H'0C80' | Row 2 | | | |
|_______________|_______________|_______________|_______________|
H'0CD0' | Row 3 | | | |
|_______________|_______________|_______________|_______________|
H'0D20' | Row 4 | | | |
|_______________|_______________|_______________|_______________|
H'0D70' | Row 5 | | | |
|_______________|_______________|_______________|_______________|
H'0DC0' | Row 6 | | | |
|_______________|_______________|_______________|_______________|
H'0E10' | Players board | | | |
H'0E20' | PLY 0 | | | |
H'0E30' | Ply 1 | | | |
H'0E40' | Ply 2 | | _____|_______________|
H'0E50' | Ply 3 _______ |_______________|__________|PLMD+___+___+___|TX |
H'0E60' | PLY 4 H'0E5F'| thru 'H'0ECE'| | |
H'0E70' | PLY 5 |overwritten by |text display | |
H'0E80' | PLY 6 | to tell player|that it is his |move |
H'0E90' | PLY 7 | | | |
H'0EA0' | PLY 8 | | | |
H'0EB0' | PLY 9 | | | ____|
H'0EC0' | PLY 10 _______|_______________|_______________|___________|___|
H'0ED0' | PLY 11 _______|_Overwritten___|_by PLMV_______|_______________|
H'0EE0' | PLY 12 _______|_______________|_______________|_______________|
H'0EF0' |_SCOR__|HI_|LO_|HI_|LO_|etc|___|___|___|___|___|___|___|___|___|
H'0F00' |___|___|___|___|___|___|___|___|___|___|___|___|_XPOS______|YPO|
H'0F10' | Row 7 of the | board image | | |
|_______________|_______________|_______________|_______________|
H'0F60' | Row 8 | | | |
|_______________|_______________|_______________|_______________|
H'0FB0' |__MOBS_________|_______________|_______________|_______________|
H'0FC0' |___|RGSV interrupt save area___________________________|
_______________________________________________________
H'0C20' |_BFLG_|_BLNF_|_XBLN_|_YBLN_|_BCNT_|_BKMV_|_HSAV_|_HSAV_|
_______________________________________________________
H'0C28' |_PLY0_|_COL0_|_SELX_|_BLEV_|_AP20_|_XOLD_|_YOLD_|_CFLG_|
Scratchpad Assignments
Octal Usage
0 General purpose
1 General purpose
2 Mobility during FIND and King move flag during SELECT
3 Move byte during FIND and Move bit during SELECT
4 Byte number and direction
5 K bit and move direction
6 Initial move bit
7 Color, (from H'0F0F' initially and updated in step with ply depth
10 Reserved for the interrupt routine
11 J
12 H high order byte
13 H low order byte
14 K high order byte
15 K low order byte
16 Q, high order
17 Q, low order
20
21
22
23
24
25 Interrogate last 6 bits for random number
26
27
30 Active pieces, 1st byte
31 Active pieces, 2st byte
32 Active pieces, 3rd byte
33 Active pieces, 4rd byte
34 Passive pieces, 1st byte
35 Passive pieces, 2nd byte
36 Passive pieces, 3rd byte
37 Passive pieces, 4th byte
40 Kings, 1st byte
41 Kings, 2nd byte
42 Kings, 3rd byte
43 Kings, 4th byte
44 Move byte
45 Byte identifying data
46 Score, high order
47 Score, low order
50 EMPTY guard byte (all zero's)
51 EMPTY 1st byte
52 EMPTY 2nd byte
53 EMPTY 3rd byte
54 EMPTY 4th byte
55 EMPTY guard byte )all zero's)
56
57
60
61
62
63
64
65
66
67
70
71
72
73
74
75
76
77
Data movement between levels when going forward
RAM Scratch
------------------------- -------------------------
|-- --| |-- Modified --|
|-- Active --|→→→→→→→+→+→→|-- by --|
|-- --| .←+←+→→|-- SELE --|
|-----------------------| ↓ |-----------------------|
|-- --| ↓ |-- Modified --|
|-- Passive --|→→→→→+→+→+→→|-- by --|
|-- --| .←←←+←+←+→→|-- SELE --|
|-----------------------| ↓ ↓ |-----------------------|
|-- --| ↓ ↓ |-- Modified --|
|-- Kings --|→+→→→+→+→+→→|-- by --|
--------. |-- --| ↓ .←+←+←+←←|-- SELE --|
Computed| |-----------------------| ↓ ↓ ↓ |-----------------------|
by |→→→→→|-- Byte / Byte Info --| ↓ ↓ ↓ |-- --|
FIND | |-----------------------| ↓ ↓ ↓ |-----------------------|
modified| |-- ACTM / PASM --|→+→+→+→→→.=↔|-- Modified by SELE --|
by | ------------------------- ↓ ↓ ↓ ↓ -------------------------
SELE | ↓ ↓ ↓ ↓
--------. ↓ ↓ ↓ ↓ ------
------------------------- ↓ ↓ ↓ ↓
|-- --| ↓ ↓ ↓ ↓
|-- Active --|←. ↓ ↓ ↓
|-- --| ↓ ↓ ↓
|-----------------------| ↓ ↓ ↓←←|ACTM and PASM
|-- --| ↓ ↓ ↓ |interchanged
|-- Passive --|←←←+ . ↓
|-- --| ↓ ↓
|-----------------------| ↓ ↓
|-- --| ↓ ↓
|-- Kings --|←←←. ↓
|-- --| ↓
|-----------------------| ↓
|-- --| ↓
|-----------------------| ↓
|-- ACTM / PASM --|←←←←←←←←←.
-------------------------
-------------------------
|-- --| Data copied from RAM to SC
|-- Active --| at start of Find or SELE
|-- --|
|-----------------------| Data copied from SC to RAM
|-- --| after completion of SELE
|-- Passive --|
|-- --| Data also copied from SC to
|-----------------------| RAM without side reversal
|-- --| with jump moves to prepare
|-- Kings --| for possible double jumps.
|-- --|
|-----------------------|
| Byte /M.A.,Byte Info |
|-----------------------|
| Score |
-------------------------
Byte treatment during (jump) FIND operations
All routines repeated 4 times for n from 0 thru 3
Bytes shown in vertical columns are AND'ed togather into S 3
RF jump moves
----------
Active byte | |
ASA+n ----------
King byte | | If (7)=-1
ASK+n -----------
Empty byte | | SR 1
ASE+n+1 ----------
--------------- ---------------
Passive byte | | SL 4 ←OR'ed→ SR 5 | | Passive byte
ASP+n --------------- --------------- ASP+n+1
LF jump moves
----------
Active byte | |
ASA+n ----------
King byte | | If (7)=-1
ASK+n -----------
Empty byte | | SL 1
ASE+n+1 ----------
--------------- --------------
Passive byte | | SL 5 ←OR'ed→ SR 4 | | Passive byte
ASP+n --------------- -------------- ASP+n+1
RB jump moves
----------
Active byte | |
ASA+n ----------
King byte | | If (7)=0
ASK+n -----------
Empty byte | | SR 1
ASE+n-1 ----------
-------------- ---------------
Passive byte | | SL 4 ←OR ed→ SR 5 | | Passive byte
ASP+n-1 -------------- --------------- ASP+n
LB jump moves
----------
Active byte | |
ASA+n ----------
King byte | | If (7)=0
ASK+n -----------
Empty byte | | SL 1
ASE+n-1 -----------
--------------- --------------
Passive byte | | SL 5 ←OR'ed→ SR 4 | | Passive byte
ASP+n-1 --------------- -------------- ASP+n
Byte treatment during (non-jump) FIND operations
All routines repeated 4 times for n from 0 thru 3
Bytes shown in vertical columns are AND'ed togather into S 3
RF non-jump moves
----------
Active byte | |
ASA+n ----------
King byte | | If (7)=-1
ASK+n ----------
-------------- ---------------
Empty byte | | SL 4 ←OR'ed→ SR 5 | | Empty byte
ASE+n -------------- --------------- ASE+n+1
LF non-jump moves
----------
Active byte | |
ASA+n ----------
King byte | | If (7)=-1
ASK+n ----------
--------------- --------------
Empty byte | | SL 5 ←OR'ed→ SR 4 | | Empty byte
ASE+n --------------- -------------- ASE+n+1
RB non-jump moves
----------
Active byte | |
ASA+n ----------
King byte | | If (7)=0
ASK+n ----------
-------------- ---------------
Empty byte | | SL 4 ←OR'ed→ SR 5 | | Empty byte
ASE+n-1 -------------- --------------- ASE+n
LB non-jump moves
----------
Active byte | |
ASA+n ----------
King byte | | If (7)=0
ASK+n ----------
--------------- --------------
Empty byte | | SL 5 ←OR'ed→ SR 4 | | Empty byte
ASE+n-1 --------------- -------------- ASE+n
MAT score function
Value of expression MAT=(A-P)*(6+Ao+Po-Ax-Px)/2
| ∂(A+P)
A-P | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
_____________________________________________________
1 | 3 | 3 | 4 | 4 | 5 | 5 | 6 | 6 | 7 |
2 | 6 | 6 | 8 | 8 | 10 | 10 | 12 | 12 | 14 |
3 | 9 | 9 | 12 | 12 | 15 | 15 | 18 | 18 | 21 |
4 | 12 | 12 | 16 | 16 | 20 | 20 | 24 | 24 | 28 |
5 | 15 | 15 | 20 | 20 | 25 | 25 | 30 | 30 | 35 |
6 | 18 | 18 | 24 | 24 | 30 | 30 | 36 | 36 |_42_|
7 | 21 | 21 | 28 | 28 | 35 | 35 |_42_|_42_|
8 | 24 | 24 | 32 | 32 | 40 | 40 |
9 | 27 | 27 | 36 | 36 |_45_|_45_|
10 | 30 | 30 | 40 | 40 |
11 | 33 | 33 |_44_|_44_| Limited to 48
12 | 36 | 36 |
13 | 39 | 39 |
14 |_42_|_42_|
Value of expression MAT=(A-P)*[(9+Ao+Po-Ax-Px)/2]
| ∂(A+P)
A-P | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
_______________________________________________________________
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 4 | 5 | 5 | 6 | 6 | 7 | 7 | 8 | 8 | 9 | 9 |
2 | 8 | 10 | 10 | 12 | 12 | 14 | 14 | 16 | 16 | 18 | 18 |
3 | 12 | 15 | 15 | 18 | 18 | 21 | 21 | 24 | 24 | 27 | 27 |
4 | 16 | 20 | 20 | 24 | 24 | 28 | 28 | 32 | 32 | 36 | 36 |
5 | 20 | 25 | 25 | 30 | 30 | 35 | 35 | 40 | 40 |_45_|_45_|
6 | 24 | 30 | 30 | 36 | 36 | 42 | 42 |_48_|_48_|
7 | 28 | 35 | 35 | 42 | 42 |_49_|_49_|
8 | 32 | 40 | 40 |_48_|_48_|
9 | 36 | 45 | 45 | Limited to 51
10 | 40 |_50_|_50_|
11 | 44 |
12 |_48_|
Loading info
Playback light on
Rewind
Load point
Low switch, inside and out
ADC off
Switch 110
Switch RAM
Switch 0000
Press CPU Reset to get response
Type L, responds L with space
Switch 300
High switch, inside only
Hit CR
Push CONT START
Light should be on and should be loading
On garbage press STOP
Rewind tape
Switch back to 110 and to Low inside
Press CPU reset
Type E 4000 cr
To set break point
Type B XXXX
when at break point read registers
ACC FFBE
ISAR FFBF
Registers 0 thru 15 T FFCO,FFCF
Boards t E10,EEF
MOBS T FBF,FBF
SCOR T EF0,F0F
On reaching a simple break point the code is reset so to continue
type E xxxx where xxxx is the breakpoint setting.
Setting a break point twice makes it sticky and in this case the code
displaced by the break must be restored if one wants it back in.
DIALING INFO.
1) Dial AMES-TIP # 961-1750, 964-8990, 965-6479, 969-6000
2) E
3) @o 11<cr>
4) Log in as usual
-
-
-
5) K<cr>
6) @C<cr>
7) <BREAK>
8) Hang up
PENDING CHANGES TO THE CHECKERS PROGRAM
The current running code for the checkers program has several short
comings that urgently need fixing but which have been left undone in order
to meet the dead-line for the January show. Some of these may lead to some
customer dissatisfaction when the program gets into wide use.
1) Wins and loses are not always reported correctly. A change in the
method of doing this has been devised but is not yet fully debugged.
2) A second defect has to do with the method used to limit the depth of
"look-ahead". This causes the program to play very badly in the end game
when the game is a near draw. I am sure that this will be the source of
considerable dissatisfaaction to many users. Fortunately, it can be fixed
by a relatively simple procedure that has been coded but not yet debugged.
The change when working would cause the program to spend more of its time
in following up along paths that show some promise of being better than
other paths. An improved method has been coded but is not yet debugged.
This method
3) Initial forked double jumps, when there is also a choice of jumps, are
not evaluated correctly. This simply causes the program to choose a non-
optimum move. A way to fix this takes more bytes than there are currently
available, so some compacting will be required. Several ways to save space
are known and they can be used, but considerable reprogramming is involved.
BAD BOARDS
To replay do the following:
Set break at FIND
Start program with player choosing black
Make any player's moves
At break hit CPU RESET
Set ED0 (PLMV) to 0
Set C2A (SELX) to 5
Set FFC7 (7) to 0, FFCA (HU) to E, FFCB (HL) to 10
Set 0E10 THRU 0E1F to the below data
Set break-point if desired
Enter program at FIND
At "YOUR MOVE" enter indicated move.
1)
E0 57 00 00 00 80 2A 2E
00 00 00 00 00 00 10 10
Black to move 15-24
2)
FE 5B 00 00 00 00 BC BF
00 00 00 00 00 00 18 18
Black to jump 16-23
3)
FF 5A 00 00 00 00 8F 75
00 00 00 00 00 00 18 18
Black to move 15-18
The following are still in question
4)
A0 28 80 00 00 41 40 10
00 00 80 00 00 00 0B 08
Black to move 11-15
5)
A0 2A 28 20 00 41 16 50
00 00 00 00 00 00 0E 0C
Black to move 19-24
6)
FE F2 00 00 00 00 2F BF
00 00 00 00 00 00 18 18
Black to move 10-14
7)
87 E7 00 00 00 08 9F 83
00 00 00 00 00 00 14 14
Black to move 15-19
Names for checkers game skill levels
ABRAHAM A
BEATRICE B
CECIL C
ABE A
BETTY B
CHARLIE C